export type DeleteApiAccountsAccountIdInteractionsInteractionIdOptions = {baseUrl?: string | undefined, BCOAuth2?: string | undefined, fetch?: typeof fetch | undefined}; /** * Delete an interaction * * DELETE /accounts/{{account_id}}/interactions/{interaction_id} */ export const deleteApiAccountsAccountIdInteractionsInteractionId = async (options?: DeleteApiAccountsAccountIdInteractionsInteractionIdOptions) => { const {baseUrl = "https://experiences.api.brightcove.com/v1", fetch: fetchFn = fetch, BCOAuth2} = options ?? {} const query = new URLSearchParams() const headers = new Headers() if (BCOAuth2 !== undefined) headers.set('authorization', `Bearer ${BCOAuth2}`) const url = `${baseUrl.replace(/\/+$/, '')}/accounts/${encodeURIComponent(String(args['{account_id']))}}/interactions/${encodeURIComponent(String(args.interaction_id))}${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "DELETE", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };